package com.lhb.repertory.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Date;
import java.sql.Time;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * @author 86131
 * @version 1.0
 * @description
 * @date 2025/8/6 下午10:01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FlightDoc {
    private Long id;
    private String airline;//航空公司
    private String flightNumber;//航班号
    private String aircraftModel;//机型
    private String placeOfDeparture;//出发地
    private String placeOfArrival;//目的地
    @JsonSerialize(using = LocalTimeSerializer.class)
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime departureTime;//出发时间
    @JsonSerialize(using = LocalTimeSerializer.class)
    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime arrivalTime;//到达时间
    private String airportOfDeparture;//出发机场
    private String airportOfArrival;//目的机场
    private String departureBuilding;//出发机场航站楼
    private String arrivalBuilding;//到达机场航站楼
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate dateOfDeparture;//出发日期
    private String aircraftSize;//飞机大小
    private String onTimeDelivery;//准点率
    private Integer passengerType;//乘客类型
    private String cabinType;//舱位类型
    private Integer price;//价格
}
